#include <iostream>
using namespace std;

const int kMaxN = 1e5 + 10;
int h[kMaxN];

int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int n, x;
  cin >> n >> x;
  for (int i = 1; i < n; i++) {
    cin >> h[i];
  }
  x *= 2;

  int ans = 0, sum = 0;
  for (int i = 1, j = 1; i < n; i++) {
    for (; sum < x && j < n + 1; sum += h[j++]);
    ans = max(ans, j - i);
    sum -= h[i];
  }
  cout << ans << "\n";
  return 0;
}